FROM centos:centos7.6.1810
MAINTAINER swoa "zhoujumbo"
ADD XXXXXXXXXXXXXXXXXXXXX.tar.gz /opt/
RUN yum install -y wget unzip &&\
    localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 &&\
    echo "LANG=zh_CN.UTF-8" > /etc/locale.conf &&\
    source /etc/locale.conf &&\
    export LANG=zh_CN.UTF-8 &&\
    LANG="zh_CN.UTF-8" &&\
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\

    # jdk
    cd /tmp && wget http://XXXXXXXXXXXXXXXXXXXXXXXXXXX/download/jdk-8u311-linux-x64.tar.gz &&\
    tar -zxf /tmp/jdk-8u311-linux-x64.tar.gz && mv /tmp/jdk1.8.0_311 /usr/local/ && rm -rf /tmp/jdk*
ENV JAVA_HOME /usr/local/jdk1.8.0_311
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/XXXXXXX/config/application.properties","-jar","/opt/XXXXXXX/bin/XXXXXXXXX.jar"]